package cn.edu.xmu.oomall.comment.controller.dto;


import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CommentDto {
    @NotBlank(message="评论内容不能为空")
    private String content;
    @NotBlank(message="发评人不能为空")
    private Long customerId ;
    @Min(value = 1, message = "评分必须大于0")
    @Max(value = 5, message = "评分不能超过5")
    private double score;
    public String getContext(){return content;}

    public void setContent(String content){this.content=content;}

    public String getContent() {
        return content;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public double getScore(){return score;}

    public void setScore(double score){this.score=score;}


}
